<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: SimpleConstMappingIterator Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00195.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">SimpleConstMappingIterator Class Reference<div class="ingroups"><a class="el" href="a00519.html">mapping - classes representing mathematical mappings</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="SimpleConstMappingIterator" --><!-- doxytag: inherits="ConstMappingIterator" -->
<p>A fully working ConstIterator-implementation usable with almost every <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>.  
 <a href="a00195.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00298_source.html">MappingBase.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for SimpleConstMappingIterator:</div>
<div class="dyncontent">
<div class="center"><img src="a01003.png" border="0" usemap="#SimpleConstMappingIterator_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for SimpleConstMappingIterator:</div>
<div class="dyncontent">
<div class="center"><img src="a01004.png" border="0" usemap="#SimpleConstMappingIterator_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a01005.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#aef703d1c7304041f2594886e902134ed">SimpleConstMappingIterator</a> (const <a class="el" href="a00058.html">ConstMapping</a> *<a class="el" href="a00195.html#a0e0ea2154862ca3e6b35c393e87849fc">mapping</a>, const <a class="el" href="a00195.html#acd382b24005d9a14b143b6efd5922eb5">SimpleConstMappingIterator::KeyEntrySet</a> *<a class="el" href="a00195.html#a55107a3430801eefc9c6130995f7e98a">keyEntries</a>, const <a class="el" href="a00013.html">Argument</a> &amp;start)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the ConstIterator for the passed <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>, with the passed key entries to iterate over and the passed position as start.  <a href="#aef703d1c7304041f2594886e902134ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#acd9ffe8031190318003512dd72a060ad">SimpleConstMappingIterator</a> (const <a class="el" href="a00058.html">ConstMapping</a> *<a class="el" href="a00195.html#a0e0ea2154862ca3e6b35c393e87849fc">mapping</a>, const <a class="el" href="a00195.html#acd382b24005d9a14b143b6efd5922eb5">SimpleConstMappingIterator::KeyEntrySet</a> *<a class="el" href="a00195.html#a55107a3430801eefc9c6130995f7e98a">keyEntries</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the ConstIterator for the passed <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>, with the passed key entries to iterate over.  <a href="#acd9ffe8031190318003512dd72a060ad"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#ae024ecc6a05c06a6c1f80cd594c387a6">getNextPosition</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next position a call to "next()" would iterate to.  <a href="#ae024ecc6a05c06a6c1f80cd594c387a6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a810c8af9b437ac5bd010cf5f4b154045">jumpTo</a> (const <a class="el" href="a00013.html">Argument</a> &amp;pos)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Lets the iterator point to the passed position.  <a href="#a810c8af9b437ac5bd010cf5f4b154045"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#aff0c387e3cc73d9821078492ae90e82f">jumpToBegin</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Lets the iterator point to the first "position of interest" of the underlying mapping.  <a href="#aff0c387e3cc73d9821078492ae90e82f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#af63f318fde0e50bc3383ebf1686d4a7a">iterateTo</a> (const <a class="el" href="a00013.html">Argument</a> &amp;pos)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Increases the position of the iterator to the passed position.  <a href="#af63f318fde0e50bc3383ebf1686d4a7a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a4984e94b5c551edac1270dc35db8e02f">next</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates to the next "point of interest" of the <a class="el" href="a00136.html" title="Represents a changeable mapping (mathematical function) from at least time to Argument::mapped_type.">Mapping</a>.  <a href="#a4984e94b5c551edac1270dc35db8e02f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a25c1a14b6104fd53f38f1ffaa0555864">inRange</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the current position of the iterator is equal or bigger than the first point of interest and lower or equal than the last point of interest.  <a href="#a25c1a14b6104fd53f38f1ffaa0555864"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a7d5c3fb31916385945abed1d6a38f797">hasNext</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if there is a next position a call to "next()" can iterate to.  <a href="#a7d5c3fb31916385945abed1d6a38f797"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a54d571cc74688a5ce0b23a8d8ba5f04c">getPosition</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current position of the iterator.  <a href="#a54d571cc74688a5ce0b23a8d8ba5f04c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual argument_value_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#ab76e81f21df7609e4af1d65e570e08ef">getValue</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value of the underlying mapping at the current position of the iterator.  <a href="#ab76e81f21df7609e4af1d65e570e08ef"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd382b24005d9a14b143b6efd5922eb5"></a><!-- doxytag: member="SimpleConstMappingIterator::KeyEntrySet" ref="acd382b24005d9a14b143b6efd5922eb5" args="" -->
typedef std::set&lt; <a class="el" href="a00013.html">Argument</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#acd382b24005d9a14b143b6efd5922eb5">KeyEntrySet</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Type for a set of Arguments defining key entries. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54ae3def7249f54515c6683ba554ccf5"></a><!-- doxytag: member="SimpleConstMappingIterator::KeyEntryType" ref="a54ae3def7249f54515c6683ba554ccf5" args="" -->
typedef KeyEntrySet::value_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a54ae3def7249f54515c6683ba554ccf5">KeyEntryType</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of a key entries item. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e0ea2154862ca3e6b35c393e87849fc"></a><!-- doxytag: member="SimpleConstMappingIterator::mapping" ref="a0e0ea2154862ca3e6b35c393e87849fc" args="" -->
const <a class="el" href="a00058.html">ConstMapping</a> *const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a0e0ea2154862ca3e6b35c393e87849fc">mapping</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The underlying <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a> to iterate over. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5600a3c00abb82f8fda8ceb84b13530b"></a><!-- doxytag: member="SimpleConstMappingIterator::dimensions" ref="a5600a3c00abb82f8fda8ceb84b13530b" args="" -->
const <a class="el" href="a00086.html">DimensionSet</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a5600a3c00abb82f8fda8ceb84b13530b">dimensions</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The dimensions of the underlying <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b29cea82195fd2084e4f63606aeb506"></a><!-- doxytag: member="SimpleConstMappingIterator::position" ref="a7b29cea82195fd2084e4f63606aeb506" args="" -->
<a class="el" href="a00195.html#a54ae3def7249f54515c6683ba554ccf5">KeyEntryType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506">position</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The current position of the iterator. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a55107a3430801eefc9c6130995f7e98a"></a><!-- doxytag: member="SimpleConstMappingIterator::keyEntries" ref="a55107a3430801eefc9c6130995f7e98a" args="" -->
const <a class="el" href="a00195.html#acd382b24005d9a14b143b6efd5922eb5">KeyEntrySet</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a55107a3430801eefc9c6130995f7e98a">keyEntries</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A pointer to a set of Arguments defining the positions to iterate over. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4e274fc2e3dc1900b7c210509fc34513"></a><!-- doxytag: member="SimpleConstMappingIterator::nextEntry" ref="a4e274fc2e3dc1900b7c210509fc34513" args="" -->
KeyEntrySet::const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513">nextEntry</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">An iterator over the key entry set which defines the next bigger entry of the current position. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa3b3120e02d9a8b5658e07c9422a039d"></a><!-- doxytag: member="SimpleConstMappingIterator::SimpleConstMappingIterator" ref="aa3b3120e02d9a8b5658e07c9422a039d" args="(const SimpleConstMappingIterator &amp;)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#aa3b3120e02d9a8b5658e07c9422a039d">SimpleConstMappingIterator</a> (const <a class="el" href="a00195.html">SimpleConstMappingIterator</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor is not allowed. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5b966ad7eaf6c7d4d013f44d5da53436"></a><!-- doxytag: member="SimpleConstMappingIterator::operator=" ref="a5b966ad7eaf6c7d4d013f44d5da53436" args="(const SimpleConstMappingIterator &amp;)" -->
<a class="el" href="a00195.html">SimpleConstMappingIterator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#a5b966ad7eaf6c7d4d013f44d5da53436">operator=</a> (const <a class="el" href="a00195.html">SimpleConstMappingIterator</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator is not allowed. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A fully working ConstIterator-implementation usable with almost every <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>. </p>
<p>Although this ConstIterator would work with almost any <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a> it should only be used for ConstMappings whose "getValue()"-method has constant complexity. This is because the iterator just calls the "getValue()"-method of the underlying <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a> on every call of its own "getValue()"-method.</p>
<p>The underlying <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a> has to provide a set of key-entries (Arguments) to the iterator to tell it the positions it should iterate over.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Karl Wessel </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aef703d1c7304041f2594886e902134ed"></a><!-- doxytag: member="SimpleConstMappingIterator::SimpleConstMappingIterator" ref="aef703d1c7304041f2594886e902134ed" args="(const ConstMapping *mapping, const SimpleConstMappingIterator::KeyEntrySet *keyEntries, const Argument &amp;start)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SimpleConstMappingIterator::SimpleConstMappingIterator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00058.html">ConstMapping</a> *&#160;</td>
          <td class="paramname"><em>mapping</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00195.html#acd382b24005d9a14b143b6efd5922eb5">SimpleConstMappingIterator::KeyEntrySet</a> *&#160;</td>
          <td class="paramname"><em>keyEntries</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td>
          <td class="paramname"><em>start</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes the ConstIterator for the passed <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>, with the passed key entries to iterate over and the passed position as start. </p>
<p>Note: The pointer to the key entries has to be valid as long as the iterator exists. </p>

<p>References <a class="el" href="a00195.html#a5600a3c00abb82f8fda8ceb84b13530b">dimensions</a>, <a class="el" href="a00013.html#a8b3fcda23d2eec4e931126d261e4b194">Argument::getDimensions()</a>, <a class="el" href="a00086.html#aae6d8ce3a87e3e1571b97c92f11363fb">DimensionSet::isSubSet()</a>, <a class="el" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513">nextEntry</a>, and <a class="el" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506">position</a>.</p>
<div class="fragment"><pre class="fragment">  : <a class="code" href="a00059.html" title="Defines an const iterator for a ConstMapping which is able to iterate over the Mapping.">ConstMappingIterator</a>()
  , <a class="code" href="a00195.html#a0e0ea2154862ca3e6b35c393e87849fc" title="The underlying ConstMapping to iterate over.">mapping</a>(mapping)
  , <a class="code" href="a00195.html#a5600a3c00abb82f8fda8ceb84b13530b" title="The dimensions of the underlying ConstMapping.">dimensions</a>(mapping-&gt;<a class="code" href="a00058.html#acc1559cf5741bec3aa6422e94c5b9cce" title="Returns this Mappings domain as DimensionSet.">getDimensionSet</a>())
  , <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>(mapping-&gt;<a class="code" href="a00058.html#acc1559cf5741bec3aa6422e94c5b9cce" title="Returns this Mappings domain as DimensionSet.">getDimensionSet</a>(), start.<a class="code" href="a00013.html#a2ecb3b041b5b8721d6767531e4ac792a" title="Returns the time value of this argument.">getTime</a>())
  , <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>(<a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>)
  , <a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a>()
{
  assert(<a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>);

  <span class="comment">//the passed start position should define a value for every dimension</span>
  <span class="comment">//of this iterators underlying mapping.</span>
  assert(start.<a class="code" href="a00013.html#a8b3fcda23d2eec4e931126d261e4b194" title="Returns the dimensions this argument is defined over.">getDimensions</a>().<a class="code" href="a00086.html#aae6d8ce3a87e3e1571b97c92f11363fb" title="Returns true if the passed DimensionSet is a subset of this DimensionSet.">isSubSet</a>(<a class="code" href="a00195.html#a5600a3c00abb82f8fda8ceb84b13530b" title="The dimensions of the underlying ConstMapping.">dimensions</a>));

  <span class="comment">//Since the position is compared to the key entries we have to make</span>
  <span class="comment">//sure it always contains only the dimensions of the underlying mapping.</span>
  <span class="comment">//(the passed Argument might have more dimensions)</span>
  <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>.setArgValues(start, <span class="keyword">true</span>);

  <a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a> = <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;upper_bound(<a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>);
}
</pre></div>
</div>
</div>
<a class="anchor" id="acd9ffe8031190318003512dd72a060ad"></a><!-- doxytag: member="SimpleConstMappingIterator::SimpleConstMappingIterator" ref="acd9ffe8031190318003512dd72a060ad" args="(const ConstMapping *mapping, const SimpleConstMappingIterator::KeyEntrySet *keyEntries)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SimpleConstMappingIterator::SimpleConstMappingIterator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00058.html">ConstMapping</a> *&#160;</td>
          <td class="paramname"><em>mapping</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00195.html#acd382b24005d9a14b143b6efd5922eb5">SimpleConstMappingIterator::KeyEntrySet</a> *&#160;</td>
          <td class="paramname"><em>keyEntries</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes the ConstIterator for the passed <a class="el" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>, with the passed key entries to iterate over. </p>
<p>Note: The pointer to the key entries has to be valid as long as the iterator exists. </p>

<p>References <a class="el" href="a00195.html#aff0c387e3cc73d9821078492ae90e82f">jumpToBegin()</a>.</p>
<div class="fragment"><pre class="fragment">  : <a class="code" href="a00059.html" title="Defines an const iterator for a ConstMapping which is able to iterate over the Mapping.">ConstMappingIterator</a>()
  , <a class="code" href="a00195.html#a0e0ea2154862ca3e6b35c393e87849fc" title="The underlying ConstMapping to iterate over.">mapping</a>(mapping)
  , <a class="code" href="a00195.html#a5600a3c00abb82f8fda8ceb84b13530b" title="The dimensions of the underlying ConstMapping.">dimensions</a>(mapping-&gt;<a class="code" href="a00058.html#acc1559cf5741bec3aa6422e94c5b9cce" title="Returns this Mappings domain as DimensionSet.">getDimensionSet</a>())
  , <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>(<a class="code" href="a00195.html#a5600a3c00abb82f8fda8ceb84b13530b" title="The dimensions of the underlying ConstMapping.">dimensions</a>)
  , <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>(<a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>)
  , <a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a>()
{
  assert(<a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>);

  <a class="code" href="a00195.html#aff0c387e3cc73d9821078492ae90e82f" title="Lets the iterator point to the first &quot;position of interest&quot; of the underlying mapping.">jumpToBegin</a>();
}
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae024ecc6a05c06a6c1f80cd594c387a6"></a><!-- doxytag: member="SimpleConstMappingIterator::getNextPosition" ref="ae024ecc6a05c06a6c1f80cd594c387a6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="a00013.html">Argument</a>&amp; SimpleConstMappingIterator::getNextPosition </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the next position a call to "next()" would iterate to. </p>
<p>This method has constant complexity.</p>
<p>Throws an <a class="el" href="a00163.html" title="This exception is thrown by the MappingIterators when &quot;next()&quot; or &quot;nextPosition()&quot; is called although...">NoNextIteratorException</a> if there is no next point of interest. </p>

<p>Implements <a class="el" href="a00059.html#a1f4cae3b170754a76049b8e81b2e3c07">ConstMappingIterator</a>.</p>
<div class="fragment"><pre class="fragment">                                                  {
    <span class="keywordflow">if</span>(<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a> == <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;end())
      <span class="keywordflow">throw</span> <a class="code" href="a00163.html" title="This exception is thrown by the MappingIterators when &quot;next()&quot; or &quot;nextPosition()&quot; is called although...">NoNextIteratorException</a>();
    <span class="keywordflow">return</span> *<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a>;
  }
</pre></div>
</div>
</div>
<a class="anchor" id="a54d571cc74688a5ce0b23a8d8ba5f04c"></a><!-- doxytag: member="SimpleConstMappingIterator::getPosition" ref="a54d571cc74688a5ce0b23a8d8ba5f04c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="a00013.html">Argument</a>&amp; SimpleConstMappingIterator::getPosition </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the current position of the iterator. </p>
<p>Constant complexity. </p>

<p>Implements <a class="el" href="a00059.html#a047e853613d5a19ff34526d0cff8fcf9">ConstMappingIterator</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>; }
</pre></div>
</div>
</div>
<a class="anchor" id="ab76e81f21df7609e4af1d65e570e08ef"></a><!-- doxytag: member="SimpleConstMappingIterator::getValue" ref="ab76e81f21df7609e4af1d65e570e08ef" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual argument_value_t SimpleConstMappingIterator::getValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the value of the underlying mapping at the current position of the iterator. </p>
<p>This method has the same complexity as the "getValue()" method of the underlying mapping. </p>

<p>Implements <a class="el" href="a00059.html#ad4419c259e747867f003d07d62d4259f">ConstMappingIterator</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <a class="code" href="a00195.html#a0e0ea2154862ca3e6b35c393e87849fc" title="The underlying ConstMapping to iterate over.">mapping</a>-&gt;<a class="code" href="a00058.html#afabbd15bb8f50e45901f99633d0a47c9" title="Returns the value of this Mapping at the position specified by the passed Argument.">getValue</a>(<a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>); }
</pre></div>
</div>
</div>
<a class="anchor" id="a7d5c3fb31916385945abed1d6a38f797"></a><!-- doxytag: member="SimpleConstMappingIterator::hasNext" ref="a7d5c3fb31916385945abed1d6a38f797" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool SimpleConstMappingIterator::hasNext </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if there is a next position a call to "next()" can iterate to. </p>
<p>Has constant complexity. </p>

<p>Implements <a class="el" href="a00059.html#ad4bac7233c154b7086c6124d2e21be49">ConstMappingIterator</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a> != <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;end(); }
</pre></div>
</div>
</div>
<a class="anchor" id="a25c1a14b6104fd53f38f1ffaa0555864"></a><!-- doxytag: member="SimpleConstMappingIterator::inRange" ref="a25c1a14b6104fd53f38f1ffaa0555864" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool SimpleConstMappingIterator::inRange </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if the current position of the iterator is equal or bigger than the first point of interest and lower or equal than the last point of interest. </p>
<p>Has constant complexity. </p>

<p>Implements <a class="el" href="a00059.html#a4a6348a453418da95978e570fec046fc">ConstMappingIterator</a>.</p>
<div class="fragment"><pre class="fragment">                               {
    <span class="keywordflow">return</span> !(<a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;empty()
         || (*(<a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;rbegin()) &lt; <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>)
         || (<a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a> &lt; *(<a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;begin())));
  }
</pre></div>
</div>
</div>
<a class="anchor" id="af63f318fde0e50bc3383ebf1686d4a7a"></a><!-- doxytag: member="SimpleConstMappingIterator::iterateTo" ref="af63f318fde0e50bc3383ebf1686d4a7a" args="(const Argument &amp;pos)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SimpleConstMappingIterator::iterateTo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Increases the position of the iterator to the passed position. </p>
<p>The passed position has to be compared greater than the previous position.</p>
<p>This method has constant complexity. </p>

<p>Implements <a class="el" href="a00059.html#a607d741e2d841265851a85670f247c46">ConstMappingIterator</a>.</p>
<div class="fragment"><pre class="fragment">                                              {
    <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>.setArgValues(pos, <span class="keyword">true</span>);
    <span class="keyword">const</span> KeyEntrySet::const_iterator keyEntriesEnd = <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;end();
    <span class="keywordflow">while</span>(<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a> != keyEntriesEnd &amp;&amp; !(<a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a> &lt; *<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a>))
      ++<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a>;
  }
</pre></div>
</div>
</div>
<a class="anchor" id="a810c8af9b437ac5bd010cf5f4b154045"></a><!-- doxytag: member="SimpleConstMappingIterator::jumpTo" ref="a810c8af9b437ac5bd010cf5f4b154045" args="(const Argument &amp;pos)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SimpleConstMappingIterator::jumpTo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Lets the iterator point to the passed position. </p>
<p>This method has logarithmic complexity (over the number of key entries). </p>

<p>Implements <a class="el" href="a00059.html#ae3cdbe2115d0e87af0da549b675f2bf8">ConstMappingIterator</a>.</p>
<div class="fragment"><pre class="fragment">                                           {
    <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>.setArgValues(pos, <span class="keyword">true</span>);
    <a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a> = <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;upper_bound(<a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a>);
  }
</pre></div>
</div>
</div>
<a class="anchor" id="aff0c387e3cc73d9821078492ae90e82f"></a><!-- doxytag: member="SimpleConstMappingIterator::jumpToBegin" ref="aff0c387e3cc73d9821078492ae90e82f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SimpleConstMappingIterator::jumpToBegin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Lets the iterator point to the first "position of interest" of the underlying mapping. </p>
<p>This method has constant complexity. </p>

<p>Implements <a class="el" href="a00059.html#a6b6af19266855c21ce3e3449de3f0d6f">ConstMappingIterator</a>.</p>

<p>Referenced by <a class="el" href="a00195.html#acd9ffe8031190318003512dd72a060ad">SimpleConstMappingIterator()</a>.</p>
<div class="fragment"><pre class="fragment">                            {
    <a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a> = <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;begin();

    <span class="keywordflow">if</span>(<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a> == <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;end()) {
      <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a> = <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>(<a class="code" href="a00195.html#a5600a3c00abb82f8fda8ceb84b13530b" title="The dimensions of the underlying ConstMapping.">dimensions</a>);
    } <span class="keywordflow">else</span> {
      <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a> = *<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a>;
      ++<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a>;
    }
  }
</pre></div>
</div>
</div>
<a class="anchor" id="a4984e94b5c551edac1270dc35db8e02f"></a><!-- doxytag: member="SimpleConstMappingIterator::next" ref="a4984e94b5c551edac1270dc35db8e02f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SimpleConstMappingIterator::next </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Iterates to the next "point of interest" of the <a class="el" href="a00136.html" title="Represents a changeable mapping (mathematical function) from at least time to Argument::mapped_type.">Mapping</a>. </p>
<p>Throws an <a class="el" href="a00163.html" title="This exception is thrown by the MappingIterators when &quot;next()&quot; or &quot;nextPosition()&quot; is called although...">NoNextIteratorException</a> if there is no next point of interest.</p>
<p>This method has constant complexity. </p>

<p>Implements <a class="el" href="a00059.html#afdafa6870cd19b3d35674a7bc777585d">ConstMappingIterator</a>.</p>
<div class="fragment"><pre class="fragment">                      {
    <span class="keywordflow">if</span>(<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a> == <a class="code" href="a00195.html#a55107a3430801eefc9c6130995f7e98a" title="A pointer to a set of Arguments defining the positions to iterate over.">keyEntries</a>-&gt;end())
      <span class="keywordflow">throw</span> <a class="code" href="a00163.html" title="This exception is thrown by the MappingIterators when &quot;next()&quot; or &quot;nextPosition()&quot; is called although...">NoNextIteratorException</a>();

    <a class="code" href="a00195.html#a7b29cea82195fd2084e4f63606aeb506" title="The current position of the iterator.">position</a> = *<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a>;
    ++<a class="code" href="a00195.html#a4e274fc2e3dc1900b7c210509fc34513" title="An iterator over the key entry set which defines the next bigger entry of the current position...">nextEntry</a>;
  }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/<a class="el" href="a00298_source.html">MappingBase.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/MappingBase.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00195.html">SimpleConstMappingIterator</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:33 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
